class Solution {
    public:
        vector<int> evenOddBit(int n) {
            int a = 0,b = 0;
            bool t = true;
            while(n){
                if(n % 2 == 1){
                    if(t){
                        a++;
                    }else{
                        b++;
                    }
                }
                t = !t;
                n/=2;
            }
            return {a,b};
        }
    };